<!--
 * @Author: DUST
 * @Date: 2023-05-16 11:44:21
 * @LastEditors: DUST
 * @LastEditTime: 2023-12-14 10:50:36
 * @FilePath: \business-card-system\admin\src\components\adminPageTemplate.vue
 * @Description: 
 * undefined
-->
<template>
  <div class="pageTemplate">
    <div class="pageTitle">{{ currentRoute.meta?.title }}</div>
    <div class="pageContent">
      <slot>内容</slot>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import router from '../router';
import { RouteLocationNormalizedLoaded } from 'vue-router';

const currentRoute = ref<RouteLocationNormalizedLoaded>(router.currentRoute.value);
</script>

<style lang="less" scoped>
.pageTemplate {
  height: 100%;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  box-sizing: border-box;
  border-radius: 8px;
  box-shadow: 0 0 2px 2px #fff;
  overflow: auto;
  .pageTitle {
    font-size: 18px;
    display: flex;
    align-items: center;
    &::before {
      content: "";
      display: inline-block;
      width: 4px;
      height: 22px;
      margin-right: 5px;
      background-color: @primary-color;
    }
  }
  .pageContent {
    height: calc(100% - 40px);
    width: 100%;
    // background-color: #fff;
  }
}
</style>